Optimal. Leaf size=115 \[ 2 a b \left (a^2+2 b^2\right ) x+\frac {b^4 \tanh ^{-1}(\sin (c+d x))}{d}+\frac {a^2 \left (2 a^2+17 b^2\right ) \sin (c+d x)}{3 d}+\frac {4 a^3 b \cos (c+d x) \sin (c+d x)}{3 d}+\frac {a^2 \cos ^2(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.17, antiderivative size = 115, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3926, 4159,
4132, 8, 4130, 3855} \begin {gather*} \frac {4 a^3 b \sin (c+d x) \cos (c+d x)}{3 d}+\frac {a^2 \left (2 a^2+17 b^2\right ) \sin (c+d x)}{3 d}+2 a b x \left (a^2+2 b^2\right )+\frac {a^2 \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^2}{3 d}+\frac {b^4 \tanh ^{-1}(\sin (c+d x))}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3855
Rule 3926
Rule 4130
Rule 4132
Rule 4159
Rubi steps
\begin {align*} \int \cos ^3(c+d x) (a+b \sec (c+d x))^4 \, dx &=\frac {a^2 \cos ^2(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d}+\frac {1}{3} \int \cos ^2(c+d x) (a+b \sec (c+d x)) \left (8 a^2 b+a \left (2 a^2+9 b^2\right ) \sec (c+d x)+3 b^3 \sec ^2(c+d x)\right ) \, dx\\ &=\frac {4 a^3 b \cos (c+d x) \sin (c+d x)}{3 d}+\frac {a^2 \cos ^2(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d}-\frac {1}{6} \int \cos (c+d x) \left (-2 a^2 \left (2 a^2+17 b^2\right )-12 a b \left (a^2+2 b^2\right ) \sec (c+d x)-6 b^4 \sec ^2(c+d x)\right ) \, dx\\ &=\frac {4 a^3 b \cos (c+d x) \sin (c+d x)}{3 d}+\frac {a^2 \cos ^2(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d}-\frac {1}{6} \int \cos (c+d x) \left (-2 a^2 \left (2 a^2+17 b^2\right )-6 b^4 \sec ^2(c+d x)\right ) \, dx+\left (2 a b \left (a^2+2 b^2\right )\right ) \int 1 \, dx\\ &=2 a b \left (a^2+2 b^2\right ) x+\frac {a^2 \left (2 a^2+17 b^2\right ) \sin (c+d x)}{3 d}+\frac {4 a^3 b \cos (c+d x) \sin (c+d x)}{3 d}+\frac {a^2 \cos ^2(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d}+b^4 \int \sec (c+d x) \, dx\\ &=2 a b \left (a^2+2 b^2\right ) x+\frac {b^4 \tanh ^{-1}(\sin (c+d x))}{d}+\frac {a^2 \left (2 a^2+17 b^2\right ) \sin (c+d x)}{3 d}+\frac {4 a^3 b \cos (c+d x) \sin (c+d x)}{3 d}+\frac {a^2 \cos ^2(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.17, size = 128, normalized size = 1.11 \begin {gather*} \frac {24 a b \left (a^2+2 b^2\right ) (c+d x)-12 b^4 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+12 b^4 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+9 a^2 \left (a^2+8 b^2\right ) \sin (c+d x)+12 a^3 b \sin (2 (c+d x))+a^4 \sin (3 (c+d x))}{12 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.11, size = 98, normalized size = 0.85
method | result | size |
derivativedivides | \(\frac {\frac {a^{4} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+4 b \,a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+6 b^{2} a^{2} \sin \left (d x +c \right )+4 b^{3} a \left (d x +c \right )+b^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(98\) |
default | \(\frac {\frac {a^{4} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+4 b \,a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+6 b^{2} a^{2} \sin \left (d x +c \right )+4 b^{3} a \left (d x +c \right )+b^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(98\) |
risch | \(2 a^{3} b x +4 a \,b^{3} x -\frac {3 i a^{4} {\mathrm e}^{i \left (d x +c \right )}}{8 d}-\frac {3 i {\mathrm e}^{i \left (d x +c \right )} b^{2} a^{2}}{d}+\frac {3 i a^{4} {\mathrm e}^{-i \left (d x +c \right )}}{8 d}+\frac {3 i {\mathrm e}^{-i \left (d x +c \right )} b^{2} a^{2}}{d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b^{4}}{d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b^{4}}{d}+\frac {a^{4} \sin \left (3 d x +3 c \right )}{12 d}+\frac {b \,a^{3} \sin \left (2 d x +2 c \right )}{d}\) | \(169\) |
norman | \(\frac {\left (-2 b \,a^{3}-4 b^{3} a \right ) x +\left (-6 b \,a^{3}-12 b^{3} a \right ) x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (2 b \,a^{3}+4 b^{3} a \right ) x \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (6 b \,a^{3}+12 b^{3} a \right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {4 a^{2} \left (a^{2}-2 b a -6 b^{2}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 a^{2} \left (a^{2}-2 b a +6 b^{2}\right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {4 a^{2} \left (a^{2}+2 b a -6 b^{2}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 a^{2} \left (a^{2}+2 b a +6 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {2 a^{2} \left (7 a^{2}-18 b a +18 b^{2}\right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}+\frac {2 a^{2} \left (7 a^{2}+18 b a +18 b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}+\frac {b^{4} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {b^{4} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(360\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 102, normalized size = 0.89 \begin {gather*} -\frac {2 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a^{4} - 6 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{3} b - 24 \, {\left (d x + c\right )} a b^{3} - 3 \, b^{4} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 36 \, a^{2} b^{2} \sin \left (d x + c\right )}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.43, size = 98, normalized size = 0.85 \begin {gather*} \frac {3 \, b^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, b^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 12 \, {\left (a^{3} b + 2 \, a b^{3}\right )} d x + 2 \, {\left (a^{4} \cos \left (d x + c\right )^{2} + 6 \, a^{3} b \cos \left (d x + c\right ) + 2 \, a^{4} + 18 \, a^{2} b^{2}\right )} \sin \left (d x + c\right )}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sec {\left (c + d x \right )}\right )^{4} \cos ^{3}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.47, size = 212, normalized size = 1.84 \begin {gather*} \frac {3 \, b^{4} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 3 \, b^{4} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + 6 \, {\left (a^{3} b + 2 \, a b^{3}\right )} {\left (d x + c\right )} + \frac {2 \, {\left (3 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 6 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 18 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 2 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 36 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 18 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{3 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.11, size = 158, normalized size = 1.37 \begin {gather*} \frac {3\,a^4\,\sin \left (c+d\,x\right )}{4\,d}+\frac {2\,b^4\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {a^4\,\sin \left (3\,c+3\,d\,x\right )}{12\,d}+\frac {a^3\,b\,\sin \left (2\,c+2\,d\,x\right )}{d}+\frac {6\,a^2\,b^2\,\sin \left (c+d\,x\right )}{d}+\frac {8\,a\,b^3\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {4\,a^3\,b\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________